﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Microsoft.Reporting.WebForms;
public partial class ReportingView_RRH : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
   
      /*  if (!IsPostBack)
        {
            ReportViewer1.LocalReport.ReportPath = MapPath("Report.rdlc");
            ReportDataSource rds = new ReportDataSource("DataSet1", GetData());//注意这里的name和报表中的一致
            ReportViewer1.LocalReport.DataSources.Clear();
            ReportViewer1.LocalReport.DataSources.Add(rds);
            ReportViewer1.LocalReport.Refresh();
        }*/

    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        this.ReportViewer1.Visible = true;
        this.ReportViewer1.LocalReport.ReportPath = Server.MapPath("~/ReportingView/Report1.rdlc");
        this.ReportViewer1.LocalReport.Refresh();
        this.ReportViewer1.LocalReport.DisplayName = this.TextBox1.Text.Trim();
      //  this.ReportViewer1.SetDisplayMode(DisplayMode.PrintLayout);
       // this.ReportViewer1.ZoomMode = ZoomMode.PageWidth;


    }
    protected void Button2_Click(object sender, EventArgs e)
    {
        Response.Redirect("~/ReportingView/ReportingAssembleHtml.aspx");

    }
}